import Vue from 'vue'
import App from './App.vue'
import router from './router'

Vue.config.productionTip = false

//1.引入全局的css和js
import "./assets/css/reset.css"  //重置样式
import "./assets/font/iconfont.css" //iconfont样式
import 'animate.css'; //动画
import "./assets/js/rem"

//定义一个全局变量
Vue.prototype.$baseUrl = "http://localhost:3000"

//2.定义全局组件
import common from "./common"  //默认加载common/index.js

//循环注册全局组件
for(let attr in common){
  // {vBack:组件，vSearch:组件}
  Vue.component(attr,common[attr]);
}

//3.定义全局过滤器
import filters from "./filters"
for(let attr in filters){
  Vue.filter(attr,filters[attr]);
}


new Vue({
  router,
  render: h => h(App)
}).$mount('#app')
